﻿#include "pch.h"
#include "script.h"

//脚本

//查找地图坐标

/// <summary>
/// 查找小地图坐标范围
/// </summary>
void findMinMap()
{
    long x = 0, y = 0;
    g_dm->FindPic(0, 0, 400, 50, L"word.bmp", L"050505", 0.90, 0, &x, &y);
    g_mapArr[2] = x + 40;//x1
    g_dm->FindPic(0, 0, 400, 50, L"npc.bmp", L"202020", 0.90, 0, &x, &y);
    if (x > 0)
    {
        g_mapArr[2] = x + 40;//x1
    }
    g_mapArr[1] = y - 5;//y
    g_dm->FindPic(0, 0, 200, 180, L"minMapLeft.bmp", L"202020", 0.9, 0, &x, &y);
    g_mapArr[0] = x;//x
    g_mapArr[3] = y + 30;//y1

}

/// <summary>
/// 查找当前角色坐标
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
void findRolePoint(long* x, long* y)
{

    g_dm->FindPic(0, 0, g_mapArr[2], g_mapArr[3], L"localTag.bmp|localTag1.bmp|localTag2.bmp|localTag3.bmp|localTag4.bmp", L"050505", 0.85, 0, x, y);

}